#ifndef INDEXGUIDE_H
#define INDEXGUIDE_H
#include <QObject>
#include <QString>
#include <QByteArray>
#include <QMetaEnum>
#include "device.h"
#include "flowmeter.h"
#include "modbustest.h"
#include "adcmodule.h"

namespace Moolink {

    class IndexGuide : public QObject
    {

            Q_OBJECT

    public:


        //为避免与真实的对象类同名，在枚举前面加lib以便区分
        enum protocollibList{
            Error=0,
            libFlowmeter,
            libModbusTest,
            libADCmodule,
        };
        Q_ENUM(protocollibList)



          static bool setDataProcessFun(Device *device);
          static bool setCmdProcessFun(Device *device);
          static QString nullgetDataResultStr(Device *device,QByteArray responseData);
          static QByteArray nullgetReadCmd(Device *device,int funCode);
          static QString(*getDataProcessFun(QString protocol))(Device *device,QByteArray responseData);
//          static QByteArray (*getCmdProcessFun(QString protocol))(Device *device,int funCode);
          //int (*opp(char))(int, int);
    private:

    };
}
#endif // INDEXGUIDE_H
